package com.iversonx.adapter.example_1.service.v2;

import com.iversonx.adapter.example_1.domain.LogModel;
import com.iversonx.adapter.example_1.remote.db.LogDbOperateApi;
import com.iversonx.adapter.example_1.remote.file.LogFileOperateApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

public class LogDbAdapter implements LogAdapter {
    private final LogDbOperateApi apdatee;
    public LogDbAdapter(LogDbOperateApi apdatee) {
        this.apdatee = apdatee;
    }

    @Override
    public void insertLog(LogModel log) {
        apdatee.insertLog(log);
    }

    @Override
    public Map<String, LogModel> mapLog() {
        return apdatee.mapLog();
    }

    @Override
    public LogModel get(String logId) {
        return apdatee.get(logId);
    }
}
